3.71 \(\int \sin ^2(a+b x) \tan (a+b x) \, dx\)

Optimal. Leaf size=28 \[ \frac{\cos ^2(a+b x)}{2 b}-\frac{\log (\cos (a+b x))}{b} \]

[Out]

Cos[a + b*x]^2/(2*b) - Log[Cos[a + b*x]]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0206091, antiderivative size = 28, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.133, Rules used = {2590, 14} \[ \frac{\cos ^2(a+b x)}{2 b}-\frac{\log (\cos (a+b x))}{b} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x]^2*Tan[a + b*x],x]

[Out]

Cos[a + b*x]^2/(2*b) - Log[Cos[a + b*x]]/b

Rule 2590

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \sin ^2(a+b x) \tan (a+b x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1-x^2}{x} \, dx,x,\cos (a+b x)\right )}{b}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{1}{x}-x\right ) \, dx,x,\cos (a+b x)\right )}{b}\\ &=\frac{\cos ^2(a+b x)}{2 b}-\frac{\log (\cos (a+b x))}{b}\\ \end{align*}

Mathematica [A]  time = 0.0174835, size = 25, normalized size = 0.89 \[ -\frac{\log (\cos (a+b x))-\frac{1}{2} \cos ^2(a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x]^2*Tan[a + b*x],x]

[Out]

-((-Cos[a + b*x]^2/2 + Log[Cos[a + b*x]])/b)

________________________________________________________________________________________

Maple [A]  time = 0.016, size = 27, normalized size = 1. \begin{align*} -{\frac{ \left ( \sin \left ( bx+a \right ) \right ) ^{2}}{2\,b}}-{\frac{\ln \left ( \cos \left ( bx+a \right ) \right ) }{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(b*x+a)*sin(b*x+a)^3,x)

[Out]

-1/2*sin(b*x+a)^2/b-ln(cos(b*x+a))/b

________________________________________________________________________________________

Maxima [A]  time = 0.975397, size = 34, normalized size = 1.21 \begin{align*} -\frac{\sin \left (b x + a\right )^{2} + \log \left (\sin \left (b x + a\right )^{2} - 1\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)^3,x, algorithm="maxima")

[Out]

-1/2*(sin(b*x + a)^2 + log(sin(b*x + a)^2 - 1))/b

________________________________________________________________________________________

Fricas [A]  time = 1.65688, size = 63, normalized size = 2.25 \begin{align*} \frac{\cos \left (b x + a\right )^{2} - 2 \, \log \left (-\cos \left (b x + a\right )\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)^3,x, algorithm="fricas")

[Out]

1/2*(cos(b*x + a)^2 - 2*log(-cos(b*x + a)))/b

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.20588, size = 39, normalized size = 1.39 \begin{align*} \frac{\cos \left (b x + a\right )^{2} - \log \left (\frac{\cos \left (b x + a\right )^{2}}{b^{2}}\right )}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(b*x+a)*sin(b*x+a)^3,x, algorithm="giac")

[Out]

1/2*(cos(b*x + a)^2 - log(cos(b*x + a)^2/b^2))/b